import { Entity, PrimaryGeneratedColumn, Column, BaseEntity, ManyToOne, OneToMany, JoinColumn, ManyToMany, JoinTable } from 'typeorm';

@Entity('setting_carousel')
export class SettingCarousel extends BaseEntity {
  @PrimaryGeneratedColumn({ comment: '轮播id' })
  carousel_id: number;

  @Column({ length: 127, default: '', comment: '标识' })
  unique: string;

  @Column({ default: 0, comment: '文件id' })
  file_id: number;

  @Column({ default: 1, comment: '类型' })
  type: number;

  @Column({ length: 255, default: '', comment: '标题' })
  title: string;

  @Column({ length: 255, default: '', comment: '链接' })
  url: string;

  @Column({ length: 255, nullable: true, comment: '图标' })
  icon: string;

  @Column({ length: 255, default: '', comment: '描述' })
  desc: string;

  @Column({ length: 255, default: '', comment: '位置' })
  position: string;

  @Column({ length: 255, default: '', comment: '备注' })
  remark: string;

  @Column({ default: 250, comment: '排序' })
  sort: number;

  @Column({ type: 'tinyint', default: 0, comment: '是否禁用，1是0否' })
  is_disable: number;

  @Column({ type: 'tinyint', default: 0, comment: '是否删除，1是0否' })
  is_delete: number;

  @Column({ default: 0, comment: '添加用户id' })
  create_uid: number;

  @Column({ default: 0, comment: '修改用户id' })
  update_uid: number;

  @Column({ default: 0, comment: '删除用户id' })
  delete_uid: number;

  @Column({ type: 'datetime', nullable: true, comment: '添加时间' })
  create_time: Date;

  @Column({ type: 'datetime', nullable: true, comment: '修改时间' })
  update_time: Date;

  @Column({ type: 'datetime', nullable: true, comment: '删除时间' })
  delete_time: Date;
}
